server {
    listen 80;
    server_name 127.0.0.1;
    proxy_buffer_size 4k;
    proxy_buffers 16 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    proxy_read_timeout 180;
    proxy_redirect off;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forward-For $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    set $prjroot /Users/twisty/workspace/idea/lemon-interlyst/fam;
    root  $prjroot/public;
    client_max_body_size 20M;
    location  /version {
        root $prjroot/public;
        add_header Content-Type text/plain;
    }
    index localindex.php index.php index.html;
    location / {
        try_files $uri $uri/ /index.php?$args;
    }
    location ~ \.php {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
        proxy_ignore_client_abort on;
    }
    location ~* ^/(js|css|image|font)/$ {
        root /Users/twisty/workspace/idea/lemon-interlyst/fam/public;
    }

    error_page 404 /404.html;
    location /404.html {
    	charset utf-8;
        root /Users/twisty/software/nginx/nginx-1.19.0/html;
    }
}
